<div class="d_table">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td colspan="6" class="d_th">
    <div class="float_left">采购底单</div>
    <div class="float_right">打印日期： <{$time|date_format:"%Y-%m-%d %H:%I:%S"}></div>
    </td>
    </tr>
  <tr>
    <td class="d_th d_td" style="text-align:right;">采购单号：</td>
    <td style="font-weight:bold;text-align:left;padding-left:5px;"><{$po.po_bn}></td>
    <td class="d_th d_td" style="text-align:right;">采购方式：</td>
    <td style="font-weight:bold;text-align:left;padding-left:5px;"><{if $po.po_type=='cash'}>现购<{else}>赊购<{/if}></td>
    <td class="d_th d_td" style="text-align:right;">供应商：</td>
    <td style="font-weight:bold;text-align:left;padding-left:5px;"><{$po.supplier}></td>
  </tr>
  <tr>
    <td class="d_th d_td" style="text-align:right;">采购员：</td>
    <td style="font-weight:bold;text-align:left;padding-left:5px;"><{$po.operator}></td>
    <td class="d_th d_td" style="text-align:right;">指定仓库：</td>
    <td style="font-weight:bold;text-align:left;padding-left:5px;"><{$po.branch}></td>
    <td class="d_th d_td" style="text-align:right;">采购日期：</td>
    <td style="font-weight:bold;text-align:left;padding-left:5px;"><{$po.purchase_time|date_format:"%Y-%m-%d %H:%I:%S"}></td>
  </tr>
  <tr>
    <td class="d_th d_td" style="text-align:right;">到货日期：</td>
    <td style="font-weight:bold;text-align:left;padding-left:5px;"><{$po.arrive_time|date_format:"%Y-%m-%d"}></td>
    <td class="d_th d_td" style="text-align:right;">金额总计：</td>
    <td style="font-weight:bold;text-align:left;padding-left:5px;"><{$po.amount}></td>
    <td class="d_th d_td" style="text-align:right;">备注：</td>
    <td style="font-weight:bold;text-align:left;padding-left:5px;">
        <{foreach from=$po.memo item=items}>
        <div id="memo_show">
        <b><{$items.op_content|escape:"HTML"}></b> <{$items.op_time}> by <{$items.op_name}>
        </div>
        <{/foreach}>
    </td>
  </tr>
</table>
</div>
<div class="d_table">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <th style="text-align:left;padding-left:5px;">基础物料名称</th>
    <th style="text-align:left;padding-left:5px;">基础物料编码</th>
    <th style="text-align:left;padding-left:5px;">规格</th>
    <th style="width:10%;text-align:left;padding-left:5px;">采购数量</th>
    <{if $type == 'eo'}><th style="width:10%;text-align:left;padding-left:5px;">待入库数量</th><{/if}>
    <th class="price" style="width:10%;text-align:left;padding-left:5px;">采购单价</th>
  </tr>
<{foreach from=$po.po_items item=i}>
<tr>
    <td style="font-weight:bold;text-align:left;padding-left:5px;"><{$i.name}></td>
    <td style="font-weight:bold; font-size:15px;text-align:left;padding-left:5px;"><{$i.bn}></td>
    <td style="font-weight:bold;text-align:left;padding-left:5px;"><{$i.spec_info}></td>
    <td style="font-weight:bold;text-align:left;padding-left:5px;"><{$i.num}></td>
    <{if $type == 'eo'}><td style="font-weight:bold;text-align:left;padding-left:5px;"><{$i.num-$i.in_num-$i.out_num}></td><{/if}>
    <td style="font-weight:bold;text-align:left;padding-left:5px;" class="price"><{$i.price}></td>
</tr>
<{/foreach}>
</table>
</div>
